#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>

class Solution {
public:
    void hanota(vector<int>& A, vector<int>& B, vector<int>& C) {
        dfs(A, B, C, A.size());
        //C = A;
    }

    void dfs(vector<int>& a, vector<int>& b, vector<int>& c, size_t n)
    {
        if (n == 1)
        {
            c.push_back(a.back());
            a.pop_back();
            return;
        }
        dfs(a, c, b, n - 1);
        c.push_back(a.back());
        a.pop_back();
        dfs(b, a, c, n - 1);
    }
};

int main()
{
	return 0;
}